<?php
namespace Web\Logic;
class  Word{
    public function dataOutput($templateName,$saveName,$array)
    {
        set_time_limit(0);
        import("Org.Util.PHPWord");

        $PHPWord = new \PHPWord();
        $document = $PHPWord->loadTemplate($templateName);


        foreach($array as $k => $v){

            $document->setValue($k, $v);
        }
        $document->save($saveName);

    }

}
?>
